package cn.shanks.springbootshirojwt.config.shiro;

import lombok.Data;
import org.apache.shiro.authc.AuthenticationToken;

/**
 * @author Shanks
 * @version 1.0
 * @program cn.shanks.springbootshirojwt.config.shior
 * @description 使用jwt的授权
 * @date 2020/11/10 10:46
 */
@Data
public class JWTToken implements AuthenticationToken {

    private String token;

    JWTToken(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}
